package zzps.exeed.kernel.holder;


import zzps.exeed.kernel.core.Ability;
import zzps.exeed.kernel.core.AppContext;
import zzps.exeed.kernel.tool.ReflectTool;

public class AbilityHolder {
    private String className;
    private ClassLoader classLoader;
    private int order = 0;
    private Ability ability;

    public AbilityHolder(String className, ClassLoader classLoader) {
        this.className = className;
        this.classLoader = classLoader;
    }

    public void init(AppContext context){
        Object o = ReflectTool.newInstance(className, classLoader);
        ability = (Ability) o;
        ability.exert(context);
    }
}
